package com.logisticsrepair.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.logisticsrepair.entity.ApplyMaterialEntity;
import com.logisticsrepair.service.ApplyMaterialService;
import com.logisticsrepair.mapper.ApplyMaterialMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author huahua
* @description 针对表【apply_material(申报材料)】的数据库操作Service实现
* @createDate 2022-03-30 18:58:39
*/
@Service
public class ApplyMaterialServiceImpl extends ServiceImpl<ApplyMaterialMapper, ApplyMaterialEntity>
    implements ApplyMaterialService{

    @Autowired
    ApplyMaterialMapper applyMaterialMapper;

    /**
     * 根据订单号，查询材料申报订单信息
     *
     * @param orderId
     * @return
     */
    @Override
    public List<ApplyMaterialEntity> queryOrderMaterialInfo(String orderId) {
        return applyMaterialMapper.queryOrderMaterialInfo(orderId);
    }

    /**
     * 查询用户待缴费订单信息
     *
     * @param userOpenid 用户id
     * @return
     */
    @Override
    public List<ApplyMaterialEntity> queryUserWaitChargeOrder(String userOpenid) {
        return applyMaterialMapper.queryUserWaitChargeOrder(userOpenid);
    }

    /**
     * 查询待支付订单
     *
     * @param applyIds 支付单号
     * @return
     */
    @Override
    public List<ApplyMaterialEntity> queryWaitPayOrderByApplyIdAs(List<String> applyIds) {
        return applyMaterialMapper.queryWaitPayOrderByApplyIds(applyIds);
    }
}




